#ifndef GAME_STATE_HPP
#define GAME_STATE_HPP

#include "AppState.hpp"

#include "ShipManager.hpp"
#include "ShipObject.hpp"
#include "ShipInput.hpp"
#include "OrbitCamera.hpp"

#include "DotSceneLoader.hpp"

#include <OgreSubEntity.h>
#include <OgreMaterialManager.h>

#include <OgreNewt.h>

class GameState : public AppState
{
	public:
		
		// Constructor
		GameState();

		DECLARE_APPSTATE_CLASS(GameState)

		// Inherited AppState functions.
		void enter();
		void exit();
		bool pause();
		void resume();
		void update(double timeSinceLastFrame);
 
		// Not inherited, but standard issue.
		void createScene();
 
		// Overrides for the OIS commands. 
		bool keyPressed(const OIS::KeyEvent &keyEventRef);
		bool keyReleased(const OIS::KeyEvent &keyEventRef);
 
		bool mouseMoved(const OIS::MouseEvent &arg);
		bool mousePressed(const OIS::MouseEvent &arg, OIS::MouseButtonID id);
		bool mouseReleased(const OIS::MouseEvent &arg, OIS::MouseButtonID id);

		// Create the ShipInput that will be used by the player.
		ShipInput *m_pPlayerInput;
	
	private:

		// Newton physics world.
		OgreNewt::World*			m_pPhysWorld;

		// Ship Manager
		ShipManager					m_ShipManager;

		// Quit flag
		bool						m_bQuit;

		// Orbit Camera
		OrbitCamera					m_OrbitCamera;

};

#endif